#include "../net/udp_server.hpp"
#define HELLO   "hello"
int main()
{
    udp_server server(8900);
    int fd = server.get_sockfd();
    printf("fd: %d\n", fd);
    char buf[4000];
    for (int i = 0; i < 3; i++){
        sockaddr_in client;
        socklen_t client_socklen = sizeof(client);
        int n = recvfrom(fd, buf, sizeof(buf), 0, reinterpret_cast<sockaddr*>(&client), &client_socklen);
        printf("n:%d\n", n);
        sendto(fd, buf, n, 0, reinterpret_cast<sockaddr*>(&client), client_socklen);
    }
    return 0;
}